package net.kucoe.grin.server;

import java.io.IOException;

/**
 * Not empty {@link GrinServer} implementation.
 * 
 * @author Vitaliy Basyuk
 */
public class GrinServerImpl implements GrinServer {
    private GrinServerThread serverThread;
    
    @Override
    public void start(final int port) throws IOException {
        serverThread = new GrinServerThread(port);
    }
    
    @Override
    public void stop() throws IOException {
        if (serverThread != null) {
            serverThread.interrupt();
        }
    }
    
}
